<?php
App::import('Sanitize');
class CommentsController extends AppController {

	var $name = 'Comments';
	function index(){
	}
	function add_comment(){
		$blog_id = $_GET['blog_id'];
	    if(!empty($this->data)){
		$this->data['Comment']['blog_id']=$blog_id;
		$this->data['Comment']['content']=Sanitize::paranoid($this->data['Comment']['content']);
		$this->data['Comment']['dateline']=Sanitize::paranoid($this->data['Comment']['dateline']);
		$this->data['Comment']['author']=$this->Session->read('User.user_id');
		    if ($this->Comment->save($this->data)) {
			}
		}
	}
}
?>
